package service;

import java.sql.SQLException;
import java.util.ArrayList;

import dao.OrderDAO;
import vo.MemberVO;
import vo.OrderListByOrderIdVO;
import vo.OrderListVO;
import vo.OrderVO;

public class OrderService {
	
	private OrderDAO orderDAO;
	private MemberVO mvo;
	private ArrayList<OrderListVO> orderList;
	private ArrayList<OrderListByOrderIdVO> list;
	private ArrayList<OrderVO> orderVOList;
	private ArrayList<String> dateList;

	public ArrayList<OrderListVO> getOrderList() {return orderList;}
	public void setOrderList(ArrayList<OrderListVO> orderList) {this.orderList = orderList;}
	public ArrayList<OrderListByOrderIdVO> getList() {return list;}
	public void setList(ArrayList<OrderListByOrderIdVO> list) {this.list = list;}
	public ArrayList<OrderVO> getOrderVOList() {return orderVOList;}
	public void setOrderVOList(ArrayList<OrderVO> orderVOList) {this.orderVOList = orderVOList;}
	public ArrayList<String> getDateList() {return dateList;}
	public void setDateList(ArrayList<String> dateList) {this.dateList = dateList;}
	public OrderDAO getOrderDAO() {return orderDAO;}
	public void setOrderDAO(OrderDAO orderDAO) {this.orderDAO = orderDAO;}
	public MemberVO getMvo() {return mvo;}
	public void setMvo(MemberVO mvo) {this.mvo = mvo;}
	
	public MemberVO selectMemberById(String member_id) {
		try {
			mvo = orderDAO.selectMemberById(member_id);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return mvo;
	}
	
	public void insertOrderList(OrderListVO orderLisvVO) {
		try {
			orderDAO.insertOrderList(orderLisvVO);
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}
	
	public ArrayList<OrderListVO> selectOrderListByOrderId(String order_id) {
		try {
			orderList = orderDAO.selectOrderListByOrderId(order_id);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return orderList;
	}
	
	public void insertOrderVO(OrderVO orderVO) {
		try {
			orderDAO.insertOrderVO(orderVO);
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}
	
	public ArrayList<OrderListByOrderIdVO> selectOrderByMemberId(String member_id) {
		try {
			list = orderDAO.selectOrderByMemberId(member_id);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return list;
	}
	
	public ArrayList<OrderVO> selectOrderListByMemberId(String member_id) {
		try {
			orderVOList = orderDAO.selectOrderListByMemberId(member_id);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return orderVOList;
	}
	
	public ArrayList<String> selectOrderDayByMemberId(String member_id) {
		try {
			dateList = orderDAO.selectOrderDayByMemberId(member_id);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return dateList;
	}
}